<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="ChangePasswordRegEx.aspx.cs" Inherits="ChangePasswordRegEx" %>
<!-- 
    Les attributs NewPasswordRegularExpression et NewPasswordRegularExpressionErrorMessage
    sont bugges ou inapplicables.
    Si on veut faire un changement de format du mot de pass il faut aller modifier le machine.config !!
    La page ChangePasswordRegEx2.aspx reprend exactement l'exemple de la MSDN Library mais cela ne marche
    pas comme ca, je n'ai sans doute pas pige la philo microsoft
-->
<html>
<head runat="server">
  <title>Change Password Page</title>
</head>
<body text="#c">
  <form id="form1" runat="server">
    <div passwordrecoveryurl="PasswordRecovery.aspx">
      <h2>ChangePassword Sample</h2>
      <h1>Ne marche pas !!!</h1>
      This sample demonstrates various style properties on the control. This sample 
      also enables non-authenticated users to change their password after verifying their 
      current password. This is particularly useful in systems that allow a user to have 
      several screen accounts.
      <br />
      <br />
      <b>Note: </b>You must first create a user for this application.
      <asp:HyperLink ID="HyperLink2" NavigateUrl="~/CreateUserWizard.aspx" runat="server">Create a user</asp:HyperLink><br />
      <hr />
      <br />
      Utilisateur : <asp:LoginName ID="LoginName1" runat="server" />
      <asp:LoginStatus ID="LoginStatus1" runat="server" />
      <br />
        <br />
        <asp:Label ID="LabelMembership" runat="server" Text="Membership" Width="106px"></asp:Label><br />
        <hr />
        &nbsp;<br />
      <asp:ChangePassword ID="ChangePassword1" runat="server" DisplayUserName="True" 
        EditProfileText="Editez votre Profil" EditProfileUrl="~/Profile.htm" 
        HelpPageText="Page d'aide" HelpPageUrl="Aide.aspx"
        InstructionText="Enterez votre Nom d'utilisateur et votre ancien Mot de passe." BackColor="#EFF3FB" 
        BorderColor="#B5C7DE" BorderPadding="4" BorderStyle="Solid" 
        BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" 
        PasswordRecoveryUrl="PasswordRecovery.aspx"
        NewPasswordRegularExpression='@\"(?=.{7,})(?=(.*\d){1,})(?=(.*\W){1,})'
        NewPasswordRegularExpressionErrorMessage=
            "Error: Your password must be at least 7 characters long, 
            and contain at least one number and one special character."
        >
        <CancelButtonStyle BackColor="White" BorderColor="#507CD1" 
          BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
          Font-Size="0.8em" ForeColor="#284E98" />
        <ChangePasswordButtonStyle BackColor="White" BorderColor="#507CD1" 
          BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
          Font-Size="0.8em" ForeColor="#284E98" />
        <ContinueButtonStyle BackColor="White" BorderColor="#507CD1" 
          BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
          Font-Size="0.8em" ForeColor="#284E98" />
        <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Size="0.9em" 
          ForeColor="White" />
        <PasswordHintStyle Font-Italic="True" ForeColor="#507CD1" />
        <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
      </asp:ChangePassword>
    </div>
  </form>
</body>
</html>
